//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.comprosoft.games.CraftingEngine;

import com.comprosoft.telnet.io.TextColor;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.regex.Pattern;

public abstract class CraftingRecepiesReader {
    public CraftingRecepiesReader() {
    }

    public static ArrayList<Element> ReadFile() throws IOException {
        ArrayList<Element> list = new ArrayList();
        InputStream is = CraftingRecepiesReader.class.getResourceAsStream("/CraftingRecepies.txt");
        BufferedReader textReader = new BufferedReader(new InputStreamReader(is));

        String line;
        while((line = textReader.readLine()) != null) {
            String[] RecipeParts = line.split(Pattern.quote(":"));
            String[] RecipeParts2 = RecipeParts[0].split(Pattern.quote(","));

            try {
                list.add(new Element(RecipeParts2[0], RecipeParts[1], TextColor.NameToColor(RecipeParts2[1])));
            } catch (Exception var7) {
                var7.printStackTrace();
            }
        }

        textReader.close();
        return list;
    }
}
